{
  "properties" : { },
  "id" : "095a0e3260e74d90bb774fd61ecbbcbb",
  "script" : null,
  "groupId" : "08fb3a72ead943ea8cba380cb3497185",
  "name" : "目录",
  "createTime" : null,
  "updateTime" : 1666775028556,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "/update",
  "method" : "PUT",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : null,
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import log;
import response;
import '@/evn/renameFolder' as renameFolder;

var oldPath = body.path;
int index = oldPath.lastIndexOf("/");
var newPath = oldPath.substring(0, index);
Boolean result;
result = renameFolder(oldPath, newPath)
if (result) {
var sql = """
    update as_group set LIBRARY_NAME = #{body.libraryName},ORDERID = #{body.orderId},
        DESCRIPTION = #{body.description},UPDATE_BY = #{body.updateBy},
        UPDATE_DATE = #{body.updateDate},PATH = #{newPath + "/" + body.libraryName}
            where ID = #{body.id}
"""
    return db.update(sql);
}else{
     return response.json({
        success: false,
        message: '文件夹重命名失败',
        code: 0
    });
}